
<%@page import="com.yourcompany.struts.form.MobileCardSalesForm"%>
 
<%@page import="com.dts.project.dao.MobileCardSalesDao"%> 

 <%
 String  target="ViewMobileCardSales.jsp?status=Updation Failed";
 try
 {
 MobileCardSalesForm form=new MobileCardSalesForm();
 form.setSaleId(Integer.parseInt(request.getParameter("SaleId")));
 form.setCardId(Integer.parseInt(request.getParameter("cardId")));
 form.setSaleDate(request.getParameter("saleDate"));
 form.setOperatorId(Integer.parseInt(request.getParameter("operationId")));
 form.setUserId(Integer.parseInt(request.getParameter("UserId")));
 MobileCardSalesDao dao=new MobileCardSalesDao();
 boolean flag=dao.UpdateMobileCardSales(form);
 if(flag)
 {
 target="ViewMobileCardSales.jsp?status=Updation success";
 }
 
 }
 catch(Exception e)
 {
 e.printStackTrace();
 }
 RequestDispatcher rd=request.getRequestDispatcher(target);
 rd.forward(request,response);
 %>